//
//  WSAlertView.h
//  WSAlertView
//
//  Created by zhangcong on 2019/3/19.
//  Copyright © 2019年 zhangcong. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
///弹窗模式
typedef enum{
    ///默认 从窗口正中 弹出
    WSAlertViewStyleAlert = 0,
    ///下
    WSAlertViewStyleActionSheetDown,
    ///上
    WSAlertViewStyleActionSheetTop,
    ///左
    WSAlertViewStyleActiAlertLeft,
    ///右边
    WSAlertViewStyleActiAlertRight,
    
}WSAlertViewStyle;
///关闭模式
typedef enum{
    //自定义的返回按钮 关闭  【默认】
    CloseStyleCustomClose = 0,
    ///触摸整个窗口 关闭
    CloseStyleTapClose ,
    /// 点击关闭按钮  关闭
    CloseStyleButtonClose,
}CloseStyle;
typedef void(^showBlock)(void);;
typedef void(^dismissBlock)(void);
@interface WSAlertView : NSObject
///弹出动画完成后的 回调
@property (nonatomic, copy) showBlock showBlock;
///关闭回调
@property (nonatomic, copy) dismissBlock dismissBlock;
///关闭模式
@property (nonatomic, assign) CloseStyle closeStyle;

/// 关闭按钮 图片 30*30
@property (nonatomic, strong) UIImage *closeImage;

@property (nonatomic, strong,readonly) UIView *contentView;


/**
 * show:withType:     弹出视图
 * @param contentView 需要弹出的视图
 * @param style       弹出模式
 */
- (void)show:(UIView *)contentView withType:(WSAlertViewStyle)style;
/**
 *  show:withType:animationFinish:dismissHandle: 弹出视图
 *  @param contentView 需要弹出的视图
 *  @param style       弹出模式
 *  @param show        弹出回调
 *  @param dismiss     消失回调
 *
 */
- (void)show:(UIView *)contentView withType:(WSAlertViewStyle)style animationFinish:(showBlock)show dismissHandle:(dismissBlock)dismiss;
/**  移除弹出视图 */
- (void)dismiss;


@end
